<?php
use app\components\AppAsset;
use app\utils\SettingUtils;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\Menu;

/* @var $this \yii\web\View */
/* @var $user \app\models\User */


AppAsset::register($this);

$user = Yii::$app->user->identity;
?>
<?php $this->beginPage(); ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode($this->title); ?> -- <?= SettingUtils::get('web_name'); ?></title>
    <?php $this->head(); ?>
</head>
<body>
<?php $this->beginBody(); ?>

<?= $this->render('__header'); ?>

<div class="mui-content">

    <div class="userBox-hd">
        <div class="user-avatar">
            <span id="<?= Url::to(['user/avatar']); ?>" class="save-avatar">
                <img  src="<?= $user->getAvatar(); ?>">
            </span>
        </div>
        <div class="name" data-href="<?= Url::to(['user/profile']); ?>">
            <?= $user->uname; ?> <i class="iconfont">&#xe613;</i>
        </div>
    </div>

    <div class="user-tab">
        <div class="flex">
            <?= \app\widgets\AppUserMenuWidget::widget(['user' => $user]); ?>
        </div>
    </div>

    <div class="user-tab-content refresh-list">
        <?= $content; ?>
    </div>
</div>

<?php $this->endBody(); ?>
<?= \app\widgets\WxJsWidget::widget([]); ?>
</body>
</html>
<?php $this->endPage(); ?>
